<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<?php  include 'action/session_check.php'; //登录判断  ?>  
<form action="" method="post">
<table>
<tr>
<td colspan="5">商品类别管理 </td></tr>
<tr>
 <td>编号</td><td>父级编号</td><td>类别名称</td><td colspan="2">操作</td></tr>
 <?php   
  require_once("../conn/conn_db.php");  //包含数据库连接文件 
  $sql = "select * from  product_type order by pt_parentid , pt_id" ; //查询语句
  $result = $conn->query($sql);  //执行SQL语句
  while($row = $result->fetch_array())   //遍历查询结果的每一行
  {
?>
 <tr>
   <td> <?php echo $row["pt_id"];?> </td>   
   <td> <?php echo $row["pt_parentid"];?> </td>
   <td> <?php echo $row["pt_name"];?> </td>
   <td> <a href="producttype_update.php?pt_id=<?php echo $row["pt_id"];?>">编辑</a></td>
   <td> <a href="action/producttype_delete_do.php?pt_id=<?php echo $row["pt_id"];?>">删除</a></td>
 </tr>
<?php }   ?>
</table>
</form>
</body>
</html>